home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 April / Macworld (1999-04).dmg / Serious Software / GrooveMaker demo / GrooveMaker Demo / Media / MenuSong.dxr / 00023.ls < prev    next >
Encoding:
Text File  |  1998-07-27  |  2.5 KB  |  70 lines

  1. on handlesprite
  2.   set the visible of sprite 12 to 0
  3. end
  4.  
  5. on createGlobalVariable
  6.   global gSong, gFirstNum, gLoadMix, gLoadSeq, gReturn, gOnSynth, gClick, gPlaySeq, gYesQuit
  7.   set gYesQuit to 0
  8.   set gSong to EMPTY
  9.   set gFirstNum to 0
  10.   set gLoadMix to EMPTY
  11.   set gLoadSeq to EMPTY
  12.   set gReturn to EMPTY
  13.   set gOnSynth to 0
  14.   set gClick to EMPTY
  15.   set gPlaySeq to 0
  16. end
  17.  
  18. on createList
  19.   global virTracklIst, volPosList, volValList, panPosList, panValList, stateTrackList, markerList, vmixlist, synthList, loadSynthList, soloGroupList
  20.   set virTracklIst to [-1, -1, -1, -1, -1, -1, -1, -1]
  21.   set volPosList to [239, 239, 239, 239, 239, 239, 239, 239]
  22.   set volValList to [28, 28, 28, 28, 28, 28, 28, 28]
  23.   set panPosList to [239, 239, 239, 239, 239, 239, 239, 239]
  24.   set panValList to [64, 64, 64, 64, 64, 64, 64, 64]
  25.   set stateTrackList to ["off", "off", "off", "off", "off", "off", "off", "off"]
  26.   set markerList to []
  27.   set vmixlist to [EMPTY, EMPTY, EMPTY, EMPTY]
  28.   set synthList to []
  29.   set loadSynthList to []
  30.   set soloGroupList to [0, 0, 0, 0, 0, 0, 0, 0]
  31. end
  32.  
  33. on writeField
  34.   global gPath
  35.   put EMPTY into field "fieldElencoSongHD"
  36.   set tList to DirectoryToList(gPath & "song:song22")
  37.   if getPos(tList, "Icon" & numToChar(13)) then
  38.     deleteAt(tList, getPos(tList, "Icon" & numToChar(13)))
  39.   end if
  40.   sort(tList)
  41.   repeat with i = 1 to count(tList)
  42.     set nome to getAt(tList, i)
  43.     if (charToNum(char 1 of nome) >= 97) and (charToNum(char 1 of nome) <= 122) then
  44.       set cartella to numToChar(charToNum(char 1 of nome) - 32)
  45.     else
  46.       set cartella to char 1 of nome
  47.     end if
  48.     repeat with j = 2 to length(nome) - 1
  49.       if (charToNum(char j of nome) >= 65) and (charToNum(char j of nome) <= 90) then
  50.         set cartella to cartella & numToChar(charToNum(char j of nome) + 32)
  51.         next repeat
  52.       end if
  53.       set cartella to cartella & char j of nome
  54.     end repeat
  55.     put cartella & RETURN after field "fieldElencoSongHD"
  56.   end repeat
  57.   set the scrollTop of member "fieldElencoSongHD" to 0
  58.   set the textFont of member "fieldElencoSongHD" to "GMfont"
  59.   set the foreColor of member "fieldElencoSongHD" to 0
  60.   set the textSize of member "fieldElencoSongHD" to 13
  61.   put EMPTY into field "fieldBpm"
  62.   put EMPTY into field "fieldMarkerSeq"
  63.   put EMPTY into field "fieldState"
  64.   put EMPTY into field "fieldDescription"
  65.   put EMPTY into field "grooveMem"
  66.   set the foreColor of member "fieldMasterVol" to 54
  67.   set the textFont of member "fieldSynth" to "GMfont"
  68.   set the foreColor of member "fieldSynth" to 14
  69. end
  70.